gtkwidget: Check return value before running bubble phase
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 12 Oct 2017 12:19:35 +0000 (14:19 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 12 Oct 2017 12:47:15 +0000 (14:47 +0200)
If the target widget gets the event consumed on the target phase,
we should not attempt to bubble up, not even within the same widget.

gtk/gtkwidget.c

index 63dd5226b22238672f63d7760b2e3678c74b82f1..905b2c61cf3431fc8638633a94f0d43e54326dc5 100644 (file)
@@ -6802,7 +6802,8 @@ gtk_widget_event_internal (GtkWidget      *widget,
         _gtk_tooltip_focus_out (widget);
     }
 
-  return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_BUBBLE);
+  if (return_val == FALSE)
+    return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_BUBBLE);
   gdk_event_free (event_copy);
 
   return return_val;